package com.itheima.Demo5;

public class Test6Innerclass {
    public static void main(String[] args) {
        InterImpl ii = new InterImpl();
        ii.show();

        new Inter(){
            @Override
            public void show() {
                System.out.println("匿名内部类show方法");
            }
        }.show();


        Inter2 i = new Inter2(){

            @Override
            public void show1() {
                System.out.println("11");
            }

            @Override
            public void show2() {
                System.out.println("22");
            }
        };
        i.show1();
        i.show2();

    }
}


interface Inter{
    public abstract void show();
}

interface  Inter2{
    void show1();
    void show2();
}

class InterImpl implements Inter{

    @Override
    public void show() {
        System.out.println("InterImpl 重写的show方法");
    }
}